<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
  <head>
	<script src="http://code.jquery.com/jquery-latest.js"></script>
	<script type="text/javascript" src="https://www.google.com/jsapi"></script>
	<link href="css/bootstrap.min.css" rel="stylesheet">
	<link href="css/bootstrap.css" rel="stylesheet">
	<link href="css/datepicker.css" rel="stylesheet">	
	<script src="js/bootstrap.js"></script>
	<script src="js/bootstrap-datepicker.js"></script>	
	<script src="js/jquery.validate.min.js"></script>
	<script src="js/script.js"></script>
	
    <title>Carnegie Financial Services</title>
  </head>
  <body style="padding-top: 20px">
    <div class="container">
		<header class="jumbotron subhead" id="overview">
			<div class="row">
				<div class="span10" >
					<h1>Carnegie Financial Services</h1>
					<p class="lead" style="padding-left: 5px;"> Mutual Funds Website </p>
				</div>
				<div class="span2" style="margin-top: 70px; margin-left: 7px;">
					<ul class="nav nav-pills" style="height: 20px;">
						<li>
							<c:choose>
								<c:when test="${ (empty user) }">
									<span><a href="login.do"><b>Login</b></a></span>
								</c:when>
								<c:otherwise>
									<span><b>Hi, ${user.userName}</b></span>
									<span><a href = "logout.do"><b>(logout)</b></a></span>
								</c:otherwise>
							</c:choose>
						</li>
					</ul>
				</div>
			</div>
			
			<div class="navbar">
				<div class="navbar-inner">
					<div class="container" style="width: auto;">
						<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
						  <span class="icon-bar"></span>
						  <span class="icon-bar"></span>
						  <span class="icon-bar"></span>
						</a>	
						<div class="nav-collapse">
					  <ul class="nav">
						<c:choose>
						<c:when test="${ (empty user) }">
							<li class><a href="login.do">Home</a></li>
							<li class="divider-vertical"></li>
						</c:when>
						<c:otherwise>
							<li class><a href="employeeConsole.jsp">Home</a></li>
							<li class="divider-vertical"></li>
						</c:otherwise>
						</c:choose>
						<li><a href="#">About Us</a></li>
						<li class="divider-vertical"></li>
						<li><a href="#">Contact</a></li>
						<li class="divider-vertical"></li>
						<li><a href="#">Help</a></li>
						<li class="divider-vertical"></li>
					  </ul>
						 
						 <%-- <c:choose>
								<c:when test="${ (empty user) }">
									
								</c:when>
								<c:otherwise>
									<ul class="nav pull-right">
								<li>
									<form method="post" class="navbar-search pull-left"
										action="researchFund.do">
										<input type="search" class="search-query span2"
											placeholder="Research funds" name="researchFund" />
									</form>
								</li>
							</ul>
								</c:otherwise>
							</c:choose> --%>
						  
						</div><!-- /.nav-collapse -->
					</div>					
				</div>
			</div>
		</header>
		
		<div class="row-fluid">
			<div class="span3">
				<div class="well" style="padding: 8px 0;">
				  <c:choose>
				   <c:when test="${ (empty user) }">
				     <ul>
				     	<li> <h5>Hi, Welcome to use Carnegie Financial Services-Mutual Fund Website. In order to use it, you must login first:</h5></li>	
				   		 <li><a href="login.do"><i class="icon-chevron-right"></i>Login</a></li> 
				   	</ul>
				   </c:when>
				   <c:otherwise>
				   		<c:choose>
				   		<c:when test = "${user.isCustomer() }">
							<ul class="nav nav-list">
							  <li class="nav-header"> <h5>logged as a customer</h5></li>	  
							  <li><a href="changePassword.do"><i class="icon-chevron-right"></i>Change Password</a></li>
							  <li><a href="viewAccount.do"><i class="icon-chevron-right"></i>View Account</a></li>
							  <li><a href="openBuyFund.do"><i class="icon-chevron-right"></i>Buy Fund</a></li>
							  <li><a href="openSellFund.do"><i class="icon-chevron-right"></i>Sell Fund</a></li>
							  <li><a href="openRequestCheck.do"><i class="icon-chevron-right"></i>Request Check</a></li>
							  <li><a href="transactionHistory.do"><i class="icon-chevron-right"></i>Transaction History</a></li>
							  <li><a href="openResearchFund.do"><i class="icon-chevron-right"></i>Research Fund</a></li>
							  <li><a href="logout.do"><i class="icon-chevron-right"></i>Logout</a></li>
							</ul>
						</c:when>
						<c:otherwise>
						    <ul class="nav nav-list">
							  <li class="nav-header"> <h5>logged as an employee</h5></li>	  
							  <li><a href="changePassword.do"><i class="icon-chevron-right"></i>Change Password</a></li>
							  <li><a href="createEmployee.do"><i class="icon-chevron-right"></i>Create Employee Account</a></li>
							  <li><a href="createCustomer.do"><i class="icon-chevron-right"></i>Create Customer Account</a></li>
							  <li><a href="modifyPassword.do"><i class="icon-chevron-right"></i>Reset Customer Password</a></li>
							  <li><a href="viewCustomer.do"><i class="icon-chevron-right"></i>View Customer Account</a></li>
							  <li><a href="transactionHistory.do"><i class="icon-chevron-right"></i>View Transaction History</a></li>
							  <li><a href="depositCheck.do"><i class="icon-chevron-right"></i>Deposit Check</a></li>
							  <li><a href="createFund.do"><i class="icon-chevron-right"></i>Create Fund</a></li>
							  <li><a href="transitionDay.do"><i class="icon-chevron-right"></i>Transition Day</a></li>
							  <li><a href="logout.do"><i class="icon-chevron-right"></i>Logout</a></li>
							</ul>
						</c:otherwise>
						</c:choose>
				   </c:otherwise>
				  </c:choose>
				</div>	
			</div>